473,417 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,417 software developers and data experts.

style and disabled?

Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled:true' and it does not seem to work. Is this possible of is
disabled not to be set in style?
Nov 4 '05 #1
1 25810
Martin wrote:
Is disabled to be set in the style of a tag just like visible? I am trying
to set the whole content of a td tag to disabled like this,
style='disabled:true' and it does not seem to work. Is this possible of is
disabled not to be set in style?


It's actually an HTML question, but since you're here...

In the HTML 4 specification, 'disabled' is an attribute of button,
input, optgroup, option, select, and textarea elements. It can have two
values: true or false.

<URL:http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>
It's value can be set in the HTML source (if set, the value is 'true'
and the element is disabled):

<input type="text" .... disabled>

Or by script:

<form ...>
<input type="text" name="textA">
<input type="button" value="Disable textA" onclick="
this.form.textA.disabled = true;
">
...
</form>
If set to 'true', the element is disabled. If set to false, it is
enabled (i.e. is is not disabled).

--
Rob
Nov 4 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kruse | last post by:
Hi, Is Possible to alter the "disabled" style? I have got <input name="test" value="1" disabled> This makes the input field gray and shadow.
1
by: Chris Ullman | last post by:
Simply put - if I have a disabled textbox how could I change the font-color from gray? e.g. <input type="text" disabled></input> Color no longer seems to work. Can it be done and if so how? ...
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
2
by: Kubuli John | last post by:
I have a LinkButton in an ASP.NET web form. Depending on the current state of affairs, I either enable or disable the link button in by code-behind class (e.g., disable the "Previous" button if...
0
by: somefakeaddress | last post by:
If I create two buttons, like this: <input type="button" value="An enabled button" style="font-size:40px; color:#a0a094; background:#d2d2c6;" /> <br /><br /> <input type="button" value="A...
6
by: James Black | last post by:
'When my form is submitted, I have onsubmit pointed to the following code snippet. But, the button is not actually set to disabled and the style.visibility changes are not made for several...
6
by: rongchaua | last post by:
Hi all, I want to change the style of a button. But I don't know how to do it. For example, I have already a button OK on form. I want to add these styles to this button (WS_CHILD || WS_VISIBLE ||...
1
by: JohnIdol | last post by:
Hi All, I am using this funcion to manipulate form elements; every thing works fine except the reference to the disabled property. Any help (the property works fine when used in classic...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.